Skip to content

Improve vue/multi-word-component-names rule docs #1871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

zjfresh
Copy link
Contributor

@zjfresh zjfresh commented Apr 26, 2022

Rule vue/multi-word-component-names

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@FloEdelmann FloEdelmann changed the title Add component name examples of <script setup> (#1867) Improve vue/multi-word-component-names rule docs Apr 26, 2022
@FloEdelmann FloEdelmann merged commit 309cace into vuejs:master Apr 26, 2022
@4tj
Copy link

4tj commented May 17, 2022

I think this rule is not friendly, component naming good or bad should be directly decided by Vue? And it also enables and throws errors by default.

Please google how many developers it causes trouble

@FloEdelmann
Copy link
Member

You are free to disable this rule. But it is the first recommendation in the Style Guide, so the rule makes sense: https://vuejs.org/style-guide/rules-essential.html#use-multi-word-component-names

@4tj
Copy link

4tj commented May 17, 2022

You are free to disable this rule. But it is the first recommendation in the Style Guide, so the rule makes sense: https://vuejs.org/style-guide/rules-essential.html#use-multi-word-component-names

So why create a rule with the highest disable rate and enable it by default?

@FloEdelmann
Copy link
Member

Because it is in the style guide and prevents errors. Note that you can also ignore single component names:

https://eslint.vuejs.org/rules/multi-word-component-names.html#options

@4tj
Copy link

4tj commented May 17, 2022

I know it can be disabled and just saying it's BAD design.

At least it should just be a warning

@FloEdelmann
Copy link
Member

That is something that can be discussed. Please open a new issue for that, with some evidence that this rule is really often disabled.

@vuejs vuejs locked as off-topic and limited conversation to collaborators May 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add good/bad example of script setup to rule doc multi-word-component-names
3 participants